//@author A0105543N
#ifndef TRASH_H
#define TRASH_H

#include "XpensItem.h"
#include "PaymentItem.h"
#include <vector>
#include <utility>

using namespace std;

class Trash{
private:
	vector < pair <XpensItem, XpensItem> > UndoExpense;
	vector < pair <XpensItem, XpensItem> > RedoExpense;
	vector < pair <PaymentItem, PaymentItem> > UndoPayment;
	vector < pair <PaymentItem, PaymentItem> > RedoPayment;
	vector < int > Operation;
	vector < int > RedoOperation;
	vector < pair <int, string> > UndoExpCategory;
	vector < pair <int, string> > UndoPayCategory;
	vector < pair <int, string> > RedoExpCategory;
	vector < pair <int, string> > RedoPayCategory;
public:
	void add_Expense( XpensItem, XpensItem );
	//pre: take in an original and a new expense transaction
	//pos: remember this change
	void add_Payment( PaymentItem, PaymentItem );
	void add_ExpCategory(int,string);
	//pre:take in the position and name of the deleted expense category
	//post: remember this operation
	void add_PayCategory(int,string);
	void getUndoExpCategory(int&,string&);
	void getUndoPayCategory(int&,string&);
	void getRedoExpCategory(int&,string&);
	void getRedoPayCategory(int&,string&);
	XpensItem getNewExpense();
	XpensItem getOriginExpense();
	int getOperation();
	int getRedoOperation();
	XpensItem getRedoNewExpense();
	XpensItem getRedoOriginExpense();
	PaymentItem getRedoNewPayment();
	PaymentItem getRedoOriginPayment();
	PaymentItem getNewPayment();
	PaymentItem getOriginPayment();
	void addOperation( int );
	void checkUndo();
	//check whether undo operations exceed the maximum number.
	void checkRedo();
	//check whether redo operations exceed the maximum number.
};
#endif